package com.hangzhou.xyj.net.request;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hangzhou.xyj.net.request.base.BaseRequest;
import com.hangzhou.xyj.utils.constants.API;

/**
 * Created by yaohuix on 2016/2/24  14:55
 * <p/>
 * 说明：我-点赞 请求
 */
public class MyLikeReq extends BaseRequest {
    public static final int TYPE_ACTIVTTY = 1; //活动/演出
    public static final int TYPE_DYNAMIC = 2; //音频

    /**
     * @param likeId 被点赞的对象的id
     * @param type   1：活动模块(活动，热点，演出)；2：动态，音频等
     * @return
     * @Description
     * @author yaohuix
     * @date 2016/2/24 14:58
     */
    public MyLikeReq(int type, int likeId, int userId) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("likeId", likeId);
        jsonObject.addProperty("type", type);
        jsonObject.addProperty("userId", userId);
        String jsonStr = new Gson().toJson(jsonObject);
        add("data", jsonStr);
    }

    @Override
    public String getUrl() {
        return API.MY_LIKE;
    }
}
